import axios from 'axios';

const apiClient = axios.create({
  baseURL: import.meta.env.VITE_APP_BASE_API || 'http://127.0.0.1:4523/m1/5546336-5223294-default', // 替换为你的后端地址
  timeout: 5000,
});

export const getLocationRecords = (locationID, page = 1, pageSize = 10) => {
  return apiClient.get(`/data/${locationID}`, {
    params: { page, pageSize },
  });
};

export const recordApi = {
  getLocationRecords,
};